package com.fyzk.activity.prize.detail;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.fyzk.bean.AwardDetail;
import com.tyjc.lottery.R;

import java.util.ArrayList;

public class PrizeDetailAwardLevelView extends RelativeLayout {

	private Context mContext;
	private ListView mLVi_awardList;
	private TextView mTxt_name;
	private TextView mTxt_BET;
	private TextView mTxt_perBet;

	public PrizeDetailAwardLevelView(Context context) {
		this(context, null);
	}

	public PrizeDetailAwardLevelView(Context context, AttributeSet attrs) {
		this(context, attrs, 0);
	}

	public PrizeDetailAwardLevelView(Context context, AttributeSet attrs,
			int defStyle) {
		super(context, attrs, defStyle);
		mContext = context;
		View.inflate(mContext, R.layout.ttc_layout_prizedetail_prizelevel, this);
		initView();
	}

	private void initView() {
		mTxt_name = (TextView) findViewById(R.id.zy_layout_prizedetail_awardName_title);
		mTxt_BET = (TextView) findViewById(R.id.zy_layout_prizedetail_awardBet_title);
		mTxt_perBet = (TextView) findViewById(R.id.zy_layout_prizedetail_singleBonus_title);
		mLVi_awardList = (ListView) findViewById(R.id.zy_layout_prizedetail_lv_award);
	}

	public void isGaoPin() {
		mTxt_BET.setVisibility(View.GONE);
	}

	public void setAwardsList(ArrayList<AwardDetail.LevelsBean> levelList) {
		mLVi_awardList.setAdapter(new AwardInfoAdapter(mContext, levelList));
	}

}
